const { resolve } = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
    entry: "./src/index.js",
    output: {
        filename: "index.js",
        path: resolve(__dirname, "dist"),
    },
    module: {
        rules: [],
    },
    plugins: [
        new HtmlWebpackPlugin({
            // 使用 './src/index.html/ 文件作为模板，并自动引入说有资源文件（js/css）。
            template: "./src/index.html",
        }),
    ],
    mode: "development",
};
